check and delete diversions outside of the computational domain.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Diversion), | intent(inout), | POINTER | :: | list |
header of the list |
|
type(grid_integer), | intent(in) | :: | grid |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(Diversion), | public, | POINTER | :: | current | |||
type(Diversion), | public, | POINTER | :: | next |
SUBROUTINE CheckDiversionInDomain & ! (list, grid) IMPLICIT NONE !Arguments with intent(in): TYPE (grid_integer), INTENT(IN) :: grid !Arguments with intent(inout): TYPE(Diversion), POINTER, INTENT (INOUT) :: list !! header of the list !local declarations TYPE(Diversion), POINTER :: current, next !---------------------------end of declarations-------------------------------- current => list DO WHILE ( ASSOCIATED (current) ) IF ( .NOT. IsPointInside ( current % xyz, mask, .TRUE. ) ) THEN next => current % next CALL DeleteDiversion (list, current) nDiversions = nDiversions - 1 ELSE next => current % next END IF current => next END DO RETURN END SUBROUTINE CheckDiversionInDomain